package com.cungmua.app.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
 * Created by kelvin.nguyen on 6/17/14.
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class Category {
    private int id;
    private String name;
    private String icon;
    private int parentId;
    List<Category> children;
    private int iconLeft=0;

    public Category(int id, String name, int parentId,int iconLeft) {
        this.id = id;
        this.name = name;
        this.parentId = parentId;
        this.iconLeft=iconLeft;
    }

    public Category() {
    }

    @JsonProperty("Id")
    public void setId(int id) {
        this.id = id;
    }

    @JsonProperty("Name")
    public void setName(String name) {
        this.name = name;
    }

    @JsonProperty("Icon")
    public void setIcon(String icon) {
        this.icon = icon;
    }

    @JsonProperty("ParentId")
    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    @JsonProperty("SubCate")
    public void setChildren(List<Category> children) {
        this.children = children;
    }

    public void setIconLeft(int iconLeft) {
        this.iconLeft = iconLeft;
    }

    public int getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public String getIcon() {
        return icon;
    }

    public int getParentId() {
        return parentId;
    }

    public List<Category> getChildren() {
        return children;
    }

    public int getIconLeft() {
        return iconLeft;
    }
}